package cn.doit.scala.day01.method

/**
 * @DATE 2021/12/24/16:42
 * @Author MDK
 * @Version 2021.2.2
 * */
object C03_Test02 {
  //函数方法的调用  匿名函数
  def opt(a:Int, b:Double, f:(Int, Double)=>Double):Double={
    f(a,b)
  }

  def main(args: Array[String]): Unit = {
    val d: Double = opt(12, 4.8, (a, b) => a - b)
    println(d)
  }
}
